// ImageSegmentDlg.h : Head file
//

#pragma once

#include "pub.h"
#include "analysis.h"

#define MAX_OBJECTS 100



// CImageSegmentDlg 
class CImageSegmentDlg : public CDialog
{
// constructor
public:
	CImageSegmentDlg(CWnd* pParent = NULL);	// Standard Constructor


	enum { IDD = IDD_IMAGESEGMENT_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);

	afx_msg LRESULT  OnNotifyIcon(WPARAM wParam, LPARAM lParam); 

	LONG   OnAnalysisImage(WPARAM wParam, LPARAM lParam);

public:
	int m_flag;


	int m_nObjects; // the number of subdirectoy

	int m_nAllObjects; // all objects

	vector<CString> m_strSampleFilename[MAX_OBJECTS];
	CString m_strSampleXmlPath[MAX_OBJECTS];

	vector<CString> m_allstrFilename[MAX_OBJECTS];

	Info m_parInfo[12];

//	CRecordAnalysis m_recordAnalysis;

	int m_num;
	double m_min;
	double m_max;
	double m_mean;
	double m_sum;

	double m_dDepthratio;

	int m_iBandnum ;


protected:
	HICON m_hIcon;

	
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg void OnDestroy();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedLink();
public:
	CString m_strAnalyPath;

public:
	CString m_strPath;
public:
	CString m_strPath2;

	CString m_CommandPath;

	CString m_strCurrPath;

	CString m_strLogMge;


public:
	afx_msg void OnBnClickedRadio1();
public:
	afx_msg void OnBnClickedRadio2();
public:
	afx_msg void OnBnClickedRadio3();


public:
	CString m_strXmlpath;
public:
	afx_msg void OnEnChangeEdit();
public:
	afx_msg void OnEnChangeEdit2();

public:
	afx_msg void OnBnClickedButton1();


public:
	afx_msg void OnBnClickedTestall();



public:
	afx_msg void OnBnClickedNewanalyse(int nObjects);

	void WriteIntoDatabase(int ***ImageSrc, int num_plane, int iHeight, int iWidth, CStringW strChannel );

	void ParseCommandPath();



public:
	afx_msg void OnBnClickedOpenparafile(int nObjects);
public:
	CProgressCtrl m_progress;

	void WriteLog(CString szMessage);
};
